// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * EavEntityAttribute generated by hbm2java
 */
@Entity
@Table(name = "eav_entity_attribute", catalog = "magento", uniqueConstraints = {
		@UniqueConstraint(columnNames = { "attribute_set_id", "attribute_id" }),
		@UniqueConstraint(columnNames = { "attribute_group_id", "attribute_id" }) })
public class EavEntityAttribute implements java.io.Serializable {

	private Integer entityAttributeId;
	private EavAttributeGroup eavAttributeGroup;
	private EavAttribute eavAttribute;
	private short entityTypeId;
	private short attributeSetId;
	private short sortOrder;

	public EavEntityAttribute() {
	}

	public EavEntityAttribute(EavAttributeGroup eavAttributeGroup,
			EavAttribute eavAttribute, short entityTypeId,
			short attributeSetId, short sortOrder) {
		this.eavAttributeGroup = eavAttributeGroup;
		this.eavAttribute = eavAttribute;
		this.entityTypeId = entityTypeId;
		this.attributeSetId = attributeSetId;
		this.sortOrder = sortOrder;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "entity_attribute_id", unique = true, nullable = false)
	public Integer getEntityAttributeId() {
		return this.entityAttributeId;
	}

	public void setEntityAttributeId(Integer entityAttributeId) {
		this.entityAttributeId = entityAttributeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_group_id", nullable = false)
	public EavAttributeGroup getEavAttributeGroup() {
		return this.eavAttributeGroup;
	}

	public void setEavAttributeGroup(EavAttributeGroup eavAttributeGroup) {
		this.eavAttributeGroup = eavAttributeGroup;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_id", nullable = false)
	public EavAttribute getEavAttribute() {
		return this.eavAttribute;
	}

	public void setEavAttribute(EavAttribute eavAttribute) {
		this.eavAttribute = eavAttribute;
	}

	@Column(name = "entity_type_id", nullable = false)
	public short getEntityTypeId() {
		return this.entityTypeId;
	}

	public void setEntityTypeId(short entityTypeId) {
		this.entityTypeId = entityTypeId;
	}

	@Column(name = "attribute_set_id", nullable = false)
	public short getAttributeSetId() {
		return this.attributeSetId;
	}

	public void setAttributeSetId(short attributeSetId) {
		this.attributeSetId = attributeSetId;
	}

	@Column(name = "sort_order", nullable = false)
	public short getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(short sortOrder) {
		this.sortOrder = sortOrder;
	}

}
